<?php

namespace app\common\validate;

use think\Validate;

class Business extends Validate
{
    protected $rule =   [
        'mobile'  => 'require|unique:business',
        'password'   => 'require',
        'salt' => 'require',
    ];

    protected $message  =   [
        'mobile.require' => '手机号码必须填写',
        'mobile.unique'     => '手机号码必须是唯一的值',
        'password.require'   => '密码必须填写',
        'salt.require'  => '密码盐必须填写',
    ];

    // 验证场景
    protected $scene = [
        'edit' => ['mobile']
    ];
}
